import jieba
with open("三国演义.txt", "r", encoding="utf8") as f:
    text = f.read()
words = jieba.lcut(text)
d = {}
for word in words:
    if len(word) > 1:
        if word in d:
            d[word] += 1
        else:
            d[word] = 1
sorted_d = sorted(d.items(), key=lambda x: x[1], reverse=True)
for i in range(20):
    print(sorted_d[i])